<!DOCTYPE html>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <meta name="viewport" content="width=device-width,minimum-scale=1,user-scalable=no,maximum-scale=1,initial-scale=1">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <meta name="format-detection" content="telephone=no">
    {php echo register_jssdk(false);}
    <meta name="description" content="{if $title}{$title}{else}{if !empty($_W['account']['name'])}{$_W['account']['name']}{/if}{/if}{if $_W['account']['siteinfo']['sitename']}{$_W['account']['siteinfo']['sitename']}{/if}">
    <link rel="stylesheet" href="{RES}css/common.css?v=20150320">
    <link rel="stylesheet" href="{RES}css/site.css?v=20150320">
    <style>
        .bgcolor {
            background-color: rgb(233, 86, 68);
        }

        .fontcolor {
            color: rgb(233, 86, 68);
        }
    </style>

    <link rel="stylesheet" href="http://static.resource.qudao.weijuju.com/css/plugin/swipeslide.css?v=20150401">
    <script type="text/javascript" src="http://static.resource.qudao.weijuju.com/js/plugin/zepto.min.js?v=20150401"></script>
    <script type="text/javascript" src="http://static.resource.qudao.weijuju.com/js/plugin/swipeslide.js?v=20150401"></script>
    <title>{if $title}{$title}{else}{if !empty($_W['account']['name'])}{$_W['account']['name']}{/if}{/if}{if $_W['account']['siteinfo']['sitename']}{$_W['account']['siteinfo']['sitename']}{/if}</title>
</head>
<body>
<div id="page">
    <div id="image" class="swipe ui-swipeslide ui-swipeslide-horizontal" style="visibility: visible;">
        <div class="swipe-wrap ui-swipeslide-reel" data-id="0"
             style="width: 1690px; -webkit-transform: translate3d(0px, 0px, 0px); -webkit-transition-property: -webkit-transform; transition-property: -webkit-transform; -webkit-transition-duration: 0.4s; transition-duration: 0.4s; -webkit-transition-timing-function: ease-out; transition-timing-function: ease-out;">
            {loop $advlist $adv}
            <div class="swipe-item ui-swipeslide-slide" style="width: 338px;">
                <a href="{$adv[link]}">
                    <img align="absmiddle" src="{php echo strpos($adv['thumb'], 'http://') === FALSE ? ($_W['attachurl'].$adv['thumb']) : $adv['thumb']}" style="height:154px" >
                </a>
                <div class="bottom">
                    <div class="title">{$adv[title]}</div>
                </div>
            </div>
            {/loop}
        </div>
    </div>
    <script type="text/javascript">
        $(function () {
            $('#image').swipeSlide({autoPlay: 3, delay: 0.4});
        });
    </script>
<style>
    #mainmenu {
        border: none;
        padding-top: 5px;
    }

    #mainmenu li {
        height: 120px;
        list-style: none;
        position: relative;
        background-color: #FFF;
    }

    #mainmenu li:first-child {
        -webkit-border-radius: 6px 6px 0px 0px;
        border-radius: 6px 6px 0px 0px;
    }

    #mainmenu li:last-child {
        -webkit-border-radius: 0px 0px 6px 6px;
        border-radius: 0px 0px 6px 6px;
    }

    #mainmenu li a {
        display: block;
        width: 100%;
        height: 100%;
    }

    #mainmenu li .text-cont {
        margin-top: 20px;
        width: 50%;
        float: left;
    }

    #mainmenu li .title {
        font-size: 1em;
        line-height: 30px;
        margin-top: 10px;
        font-weight: bold;
    }

    #mainmenu li .summary {
        font-size: 0.7em;
        line-height: 20px;
        height: 40px;
        overflow: hidden;
    }

    #mainmenu li .img-cont {
        margin-top: 10px;
        float: left;
        width: 50%;
    }

    #mainmenu li img {
        display: block;
        width: 100px;
        height: 100px;
        -webkit-border-radius: 100px;
        -moz-border-radius: 100px;
        border-radius: 100px;
        margin: 0 auto;
    }
</style>
<style>
    body, #mainmenu {
        background: rgba(0, 0, 0, 0);
    }
</style>
    <div id="mainmenu" class="fn-clear">
        <ul>
            {data func="amouse_article_site_category" parentid=$cid return="true" assign="navs"}
            {if empty($navs)}
                {data module="amouse_article" func="amouse_article_site_article" cid=$cid return="true" assign="result"}
                {loop $result['list'] $row}
                <li>
                    <a href="{php echo $this->createMobileUrl("detail",array("id" => $row['id']),true)}">
                        <div class="img-cont">
                            {if !empty($row['thumb'])}
                            <img src="{php echo strpos($row['thumb'],'http://')===FALSE?($_W['attachurl'].$row['thumb']):$row['thumb']}" height="65" width="45"/>
                            {/if}
                        </div>
                        <div class="text-cont">
                            <p class="title">{$row[title]}</p>
                            <p class="summary">{$row[description]}</p>
                        </div>
                    </a>
                </li>
                {/loop}
            {else}
                {loop $navs $nav}
                <li>
                    <a href="{php echo $this->createMobileUrl("second",array("parentid"=>$row['parentid'],"cid" => $row['id']),true)}">
                    <div class="img-cont">
                        {if !empty($nav['thumb'])}
                        <img src="{php echo strpos($nav['thumb'],'http://')===FALSE?($_W['attachurl'].$nav['thumb']):$nav['thumb']}" height="65" width="45"/>
                        {/if}
                    </div>
                    <div class="text-cont">
                        <p class="title">{$nav[name]}</p>
                        <p class="summary">{$nav[description]}</p>
                    </div>
                    </a>
                </li>
                {/loop}
            {/if}
        </ul>
    </div>
    <div id="footer">
           Copyright © {if !empty($set['copyright'])}{$set['copyright']}{else}{$_W['account']['name']}{/if}
    </div>
</div>

<div id="toTop" style="position: fixed; display: none; bottom: 0px; left: 10px; z-index: 998; opacity: 0.8;">
    <a href="javascript:void(0);" onclick="javascript:window.scrollTo(0,0);">
        <img style="width:46px;height:46px;" src="{RES}images/topplus.png" align="absmiddle">
    </a>
</div>
</body>
<script language='javascript'>

    wx.ready(function () {
        shareMeta = {
            imgUrl:"{$shareimg}",
            link:"{$url}",
            desc:"{if !empty($category['description'])}{$category['description']}{else}{$_W['account']['name']}的精美图文{/if}",
            title:"{if !empty($category['title'])}{$category['title']}{else}{$_W['account']['name']}的精美图文{/if}",
            success: function(){

            },
            cancel: function(){
                // alert("分享失败，可能是网络问题，一会儿再试试？");
            }
        };
        wx.onMenuShareTimeline(shareMeta);
        wx.onMenuShareAppMessage(shareMeta);
        wx.onMenuShareWeibo(shareMeta);
        wx.onMenuShareQQ(shareMeta);
        wx.onMenuShareQZone(shareMeta);
    });
</script>
</html>